package com.zb.baidu.controller;

import com.zb.exception.BaiduAppException;
import com.zb.exception.ZbException;
import com.zb.baidu.entity.vo.AddressRecognitionSearchVo;
import com.zb.baidu.service.ConBaiduService;
import com.zb.result.PageUtil;
import com.zb.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @Author WEN
 * @Date 2024/4/24 0024
 **/
@Api(tags = "PC端识别类接口")
@RestController
@RequestMapping("/map")
public class BaiduController {
    @Resource
    private ConBaiduService conBaiduService;

    @ApiOperation("地址识别")
    @PostMapping("/addressRecognition")
    public Result addressRecognition(@RequestBody @Valid AddressRecognitionSearchVo addressRecognitionSearchVo) throws BaiduAppException {
        return Result.success("地址识别成功").data(PageUtil.row(conBaiduService.addressRecognition(addressRecognitionSearchVo)));
    }


}
